# @Time    :2025/4/16 9:52
def climb1(n):
    pre = 1
    cur = 1
    for _ in range(1, n):
        pre, cur = cur, pre + cur
    return cur


print(climb1(7))


def climb2(n):
    if n == 1:
        return 1
    elif n == 2:
        return 2

    else:
        return climb2(n - 1) + climb2(n - 2)#当前台阶爬到的方法，等于前两层台阶的和
